package com.example.train.service;

import com.example.train.model.SysAdminRoleRelation;
import com.example.train.model.request.SysAdminLoginRequest;
import com.example.train.model.SysAdmin;
import org.springframework.security.core.AuthenticationException;

import java.util.List;

public interface SysAdminService {

    int deleteByPrimaryKey(Long id);

    Integer insert(SysAdmin record);

    int insertSelective(SysAdmin record);

    SysAdmin selectByPrimaryKey(Long id, boolean withPwd);

    SysAdmin selectByUsername(String username);

    List<SysAdmin> selectAll(int pageNum, int pageSize);

    int updateByPrimaryKeySelective(SysAdmin record);

    int updateByPrimaryKey(SysAdmin record);

    SysAdmin login(SysAdminLoginRequest sysAdminLoginRequest) throws AuthenticationException;

    int updateMultiAdminRole(List<SysAdminRoleRelation> param);

}
